package org.angelica.exception;

/**
 * 自定义服务异常
 * @author aizhimin
 */
public class ServiceException extends RuntimeException {
	
	private static final long serialVersionUID = -6187278601290069774L;
	private int code;
	
	public ServiceException(int code, String message) {
		super(message);
		this.code = code;
	}

	public ServiceException(ServiceErrorEnum serviceError) {
		super(serviceError.getMsg());
		this.code = serviceError.getCode();
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}
	
	
}
